{% extends "Themes/Blog/templates/page.twig" %}
{% block body %}
    <!--single article-->
    {% for item in entityList('node',['limit':10]) %}
        <div class="article">
            <div class="articleHeader">
                <h1 class="articleTitle">
                    <a href="{{ url(['for':'node','id':item.id]) }}">{{ item.title }}</a>
                </h1>
            </div>
            <div class="articleBody clearfix">
                <!--缩略图-->
                <div class="articleThumb">
                    <a href="{{ url(['for':'node','id':item.id]) }}">
                        <img src="{% if item.images is defined AND item.images %}{{ item.images }}{% else %}/themes/blog/images/{{ rand(1,11) }}.jpg{% endif %}" alt="{{ item.title }}" class="wp-post-image" width="400" height="200"/>
                    </a>
                </div>
                <!--摘要-->
                <div class="articleFeed">
                    <p>{{ subString(item.body,250,true) }}</p>
                </div>
            </div>
            <div class="articleFooter clearfix">
                <ul class="articleStatu">
                    <li><i class="fa fa-calendar"></i>{{ timeTran(item.changed) }}</li>
                    <li><i class="fa fa-eye"></i>{{ item.browse }}次浏览</li>
                    <li>
                        <i class="fa fa-folder-o"></i>
                        {% if item.cat is defined AND item.cat %}
                            <a href="{{ url(['for':'term','id':item.cat.term.id,'page':1]) }}" rel="category tag">{{ item.cat.term.name }}</a>
                        {% endif %}
                    </li>
                </ul>
                <a href="{{ url(['for':'node','id':item.id]) }}" class="btn btn-readmore btn-info btn-md">阅读更多</a>
            </div>
        </div>
        <!--single article-->
    {% endfor %}
{% endblock %}
{% block rightRegion %}
    {% include 'Themes/Blog/templates/rightRegion.twig' %}
{% endblock %}